Skip to content

Fix get-demos CI: remove module.exports incompatible with Node 24 - #386

Merged
SeiferTim merged 2 commits into
devfrom
copilot/fix-get-demos-job
Jul 3, 2026
Merged

Fix get-demos CI: remove module.exports incompatible with Node 24#386
SeiferTim merged 2 commits into
devfrom
copilot/fix-get-demos-job

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The get-demos job fails with ReferenceError: module is not defined because GitHub Actions runners now default to Node 24, where module is not available in the eval() context used by actions/github-script for inline scripts.

Changes

  • .github/workflows/build-concurrently.yml: Removed the module.exports = ({core}) => { ... } wrapper from the inline github-script script. Inline scripts run as the body of an async function with core already in scope — module.exports is only valid for external script files, not inline usage.
// Before (broken on Node 24)
module.exports = ({core}) => {
  // ...
  return projectPaths;
}

// After
try {
  // ...
  return projectPaths;
} catch (error) {
  core.setFailed(error.message);
}

Copilot AI changed the title [WIP] Fix failing GitHub Actions job get-demos Fix get-demos CI: remove module.exports incompatible with Node 24 Jul 3, 2026
Copilot AI requested a review from SeiferTim July 3, 2026 21:03
@SeiferTim
SeiferTim marked this pull request as ready for review July 3, 2026 21:03
Copilot AI review requested due to automatic review settings July 3, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the get-demos GitHub Actions job on newer runners (Node 24 default) by updating the inline actions/github-script usage to avoid module.exports, which is not available in the inline eval() execution context.

Changes:

  • Removed the module.exports = ({core}) => { ... } wrapper from the inline github-script block.
  • Kept the existing folder scan logic and try/catch failure handling while returning the demo path list for downstream matrix expansion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SeiferTim
SeiferTim merged commit b68f1d2 into dev Jul 3, 2026
17 checks passed
@SeiferTim
SeiferTim deleted the copilot/fix-get-demos-job branch July 3, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants